

import java.awt.Dimension;

import javax.swing.JFrame;

public class TestJFrame {
	
	// Set up and show the window
	public static void createAndShowGUI() {
		// Create a JFrame
		JFrame frame = new JFrame("TestJFrame");
		
		// When the window is closed, exit the application
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		// Set a minimum window size
		frame.setMinimumSize(new Dimension(320, 240));

		// Insert a TestApplet into the JFrame
		frame.getContentPane().add(new TestApplet());

		// Show the window
		frame.setVisible(true);
	}

	public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
    }

}
